<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增参数')" />
	<th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-proper-add">
		<h4 class="form-header h4">参数信息</h4>
		<div class="nput-group col-sm-12 row"  id="properCalculate">
			<div  class="col-sm-12 row">
				<label class="col-sm-2 control-label  is-required">生成日期：</label>
				<div class="col-sm-3">
					<input class="first form-control m-b" style="width: 250px" id="etldt" name="etldt" placeholder="请填写日期"></input>
				</div>
			</div>

<!--			<div class="ibox-title">-->
<!--				<button id="saveProper" class="btn btn-primary  btn-xs" onclick="save()" type="button">计算</button>-->
<!--			</div>-->
		</div>
	</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<th:block th:include="include :: jquery-cxselect-js" />
<script th:inline="javascript">

	$(function() {
		// save();
	});

    $("#form-proper-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
			save();
        }
    }
    function add(){
        var etldt= $("#etldt").val();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx+"sujian/propertyManagementFee/calculate",
            data : {
                "etldt": etldt
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {
                $.operate.successCallback(data);
            }
        });
    }
    function save(){
        var etldt= $("#etldt").val();
        $.ajax({
            cache : true,
            type : "POST",
            url : ctx+"sujian/propertyManagementFee/calculateValue",
            data : {
                "etldt": etldt
            },
            async : false,
            error : function(request) {
                $.modal.alertError("系统错误");
            },
            success : function(data) {

                $.operate.successCallback(data);
            }
        });
	}
</script>
</body>
</html>
